package speedball;

import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;

public class PanelManage {
	
	
	public static GridPane createGridPane(double x,double y,double weight,double height,boolean gridLinesVisible) {
		//double rowHeight,double colWidth,
		GridPane gridPane = new GridPane();
		
		gridPane.setLayoutX(x);
		gridPane.setLayoutY(y);
		gridPane.setPrefHeight(height);
		gridPane.setPrefWidth(weight);
//		 gridPane.setStyle("-fx-background-color:#434547;");

//		RowConstraints rowinfo3 = new RowConstraints();
//		rowinfo3.setPrefHeight(rowHeight);
//
//		ColumnConstraints colInfo2 = new ColumnConstraints();
//		colInfo2.setPrefWidth(colWidth*1.0D);
//
//		gridPane.getRowConstraints().add(rowinfo3);// 2*50 percent
//		gridPane.getRowConstraints().add(rowinfo3);
//		gridPane.getColumnConstraints().add(colInfo2); // 25 percent
//		gridPane.getColumnConstraints().add(colInfo2); // 50 percent
//		rowinfo3.setVgrow(Priority.SOMETIMES);
//		colInfo2.setHgrow(Priority.SOMETIMES);
		
//		content.addAll(doe, speed, CPU, temperature);
		gridPane.setGridLinesVisible(gridLinesVisible);
		return gridPane;
	}


	public static BorderPane createBorderPanel(double width,double height,Node top,Node bottom,Node left,Node right,Node center){


		BorderPane borderPane=new BorderPane();


//		AnchorPane top=new  AnchorPane();
//
//		AnchorPane bottom=new  AnchorPane();
//
//		AnchorPane left=new  AnchorPane();
//
//		AnchorPane right=new  AnchorPane();
//
//		AnchorPane center=new  AnchorPane();

		borderPane.setTop(top);
		borderPane.setBottom(bottom);
		borderPane.setLeft(left);
		borderPane.setRight(right);
		borderPane.setCenter(center);

		borderPane.setPrefWidth(width);
		borderPane.setPrefHeight(height);

return borderPane;
	}

	public static AnchorPane createAnchorPane(double x,double y,double weight,double height) {
		//double rowHeight,double colWidth,
		AnchorPane pane = new AnchorPane();


		pane.setPrefHeight(height);
		pane.setPrefWidth(weight);
//		 gridPane.setStyle("-fx-background-color:#434547;");

//		RowConstraints rowinfo3 = new RowConstraints();
//		rowinfo3.setPrefHeight(rowHeight);
//
//		ColumnConstraints colInfo2 = new ColumnConstraints();
//		colInfo2.setPrefWidth(colWidth*1.0D);
//
//		gridPane.getRowConstraints().add(rowinfo3);// 2*50 percent
//		gridPane.getRowConstraints().add(rowinfo3);
//		gridPane.getColumnConstraints().add(colInfo2); // 25 percent
//		gridPane.getColumnConstraints().add(colInfo2); // 50 percent
//		rowinfo3.setVgrow(Priority.SOMETIMES);
//		colInfo2.setHgrow(Priority.SOMETIMES);

//		content.addAll(doe, speed, CPU, temperature);
//		pane.setGridLinesVisible(gridLinesVisible);
		return pane;
	}
	
	
	

}
